package org.example.simpleFactoryModel;

/**
 * @auther hewenhui
 * @see <a href="hetp://www.codingmaster.com> java </a>
 */

import org.example.simpleFactoryModel.Weapons.Weapon;

/**
 * @author 动力节点
 * @version 1.0
 * @className Client
 * @since 1.0
 **/
public class Client {
    public static void main(String[] args) {
        Weapon weapon1 = (Weapon) WeaponsFactory.getWeapon("tank");
        weapon1.attack();

        Weapon weapon2 = (Weapon) WeaponsFactory.getWeapon("fighter");
        weapon2.attack();

        Weapon weapon3 = (Weapon) WeaponsFactory.getWeapon("machineGun");
        weapon3.attack();
    }
}

